package com.aaa.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单信息表
 */
@Data
@TableName(value = "tb_ord_inf")
public class TbOrdInf implements Serializable {
    public static final String COL_SERIAL_NO = "serial_no";
    public static final String COL_SHIPPING_ACCOUNT = "shipping_account";
    /**
     * 流水号
     */
    @TableId(value = "oid", type = IdType.UUID)
    private String oid;

    /**
     * 关联商品id
     */
    @TableField(value = "tid")
    private String tid;

    /**
     * 订单状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 支付类型
     */
    @TableField(value = "pay_type")
    private String payType;

    /**
     * 支付状态
     */
    @TableField(value = "pay_status")
    private String payStatus;

    /**
     * 账户
     */
    @TableField(value = "account_id")
    private String accountId;

    /**
     * 收货人
     */
    @TableField(value = "shipping_name")
    private String shippingName;

    /**
     * 收货地址
     */
    @TableField(value = "shipping_address")
    private String shippingAddress;

    /**
     * 收货电话
     */
    @TableField(value = "shipping_phone")
    private String shippingPhone;

    /**
     * 发货方式
     */
    @TableField(value = "post_way")
    private String postWay;

    /**
     * 配送费
     */
    @TableField(value = "post_fee")
    private BigDecimal postFee;

    /**
     * 订单总价
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    @TableField(value = "create_by")
    private String createBy;

    @TableField(value = "create_date")
    private String createDate;

    @TableField(value = "update_by")
    private String updateBy;

    @TableField(value = "update_date")
    private String updateDate;

    @TableField(value = "remark")
    private String remark;

    @TableField(value = "version")
    private Integer version;

    @TableField(value = "state")
    private Integer state;

    //一对多
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @TableField(exist = false)
    private TbPrdInfo tbPrdInfoList;

    public static final String COL_OID = "oid";

    public static final String COL_TID = "tid";

    public static final String COL_STATUS = "status";

    public static final String COL_PAY_TYPE = "pay_type";

    public static final String COL_PAY_STATUS = "pay_status";

    public static final String COL_ACCOUNT_ID = "account_id";

    public static final String COL_SHIPPING_NAME = "shipping_name";

    public static final String COL_SHIPPING_ADDRESS = "shipping_address";

    public static final String COL_SHIPPING_PHONE = "shipping_phone";

    public static final String COL_POST_WAY = "post_way";

    public static final String COL_POST_FEE = "post_fee";

    public static final String COL_PRICE = "total_price";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_DATE = "create_date";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_DATE = "update_date";

    public static final String COL_REMARK = "remark";

    public static final String COL_VERSION = "version";

    public static final String COL_STATE = "state";
}